package com.example.bookshop.controller.user;

import com.example.bookshop.entity.Business;
import com.example.bookshop.service.user.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@CrossOrigin
public class BusinessController {
    @Autowired
    private BusinessService businessService;

    @RequestMapping("api/getBusiness")
    public Business getBusiness(HttpSession session){
        return businessService.getBusiness(session);
    }
}
